package edu.utd.text.game.domain.item;

import edu.utd.text.game.domain.GameObject;

/**
 * GameItem
 * A game item is something that a player can interact
 * with and more important carry as part of their inventory
 * @author troy
 *
 */
public class GameItem extends GameObject {
	
	
	public GameItem(String name) {
		this.name = name;
	}
	
	public String getDescription() {
		if (this.description == null) {
			this.description = "";
		}
		return this.description;
	}
	
	@Override
	public boolean equals(Object other) {
		if (other instanceof GameItem) {
			GameItem item = (GameItem)other;
			if (item.getClass() == this.getClass()) {
				return super.equals(other);	//checks for sameness of name attribute
			}
		}
		return false;
	}
}
